package demo.vo;

import java.io.Serializable;
import java.time.LocalDateTime;

/**
 * 对省市的包装类
 * 
 * @author hanjy
 *
 */
public class ProvinceCity implements Serializable {

    private static final long serialVersionUID = 1L;

    /** 省份 */
    private String province;

    /** 城市 */
    private String city;

    private LocalDateTime updateTime;

    public ProvinceCity() {
        super();
    }

    public ProvinceCity(String province, String city) {
        super();
        this.province = province;
        this.city = city;
    }

    public String getProvince() {
        return province;
    }

    public void setProvince(String province) {
        this.province = province;
    }

    public String getCity() {
        return city;
    }

    public void setCity(String city) {
        this.city = city;
    }

    public LocalDateTime getUpdateTime() {
        return updateTime;
    }

    public void setUpdateTime(LocalDateTime updateTime) {
        this.updateTime = updateTime;
    }

    @Override
    public int hashCode() {
        final int prime = 31;
        int result = 1;
        result = prime * result + ((city == null) ? 0 : city.hashCode());
        result = prime * result + ((province == null) ? 0 : province.hashCode());
        return result;
    }

    @Override
    public boolean equals(Object obj) {
        if (this == obj)
            return true;
        if (obj == null)
            return false;
        if (getClass() != obj.getClass())
            return false;
        ProvinceCity other = (ProvinceCity) obj;
        if (city == null) {
            if (other.city != null)
                return false;
        } else if (!city.equals(other.city))
            return false;
        if (province == null) {
            if (other.province != null)
                return false;
        } else if (!province.equals(other.province))
            return false;
        return true;
    }
}
